// update_songsize()
var xx, yy;
xx = enda
yy = endb
if (colamount[xx] = 0) {
    for (a = xx; a >= 0; a -= 1) {
        enda = a
        if (colamount[a] > 0) break
    }
}
if (rowamount[yy] = 0) {
    for (b = yy; b >= 0; b -= 1) {
        endb = b
        if (rowamount[b] > 0) break
    }
}
